﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;

namespace DownloadInterface
{
    class Program
    {
        static void Main(string[] args)
        {
            DownloadTask task = new DownloadTask(
                "http://v.youku.com/v_show/id_XMzA0MjI3MTM2.html"
                , "test.exe", "", new FileCategory());
            /*"http://v.youku.com/v_show/id_XMzA0MjI3MTM2.html"*/
            /*http://developer.51cto.com/art/201111/302195.htm*/
            /*http://dl2.cache.wps.cn/download/WPS2012.12012.exe*/
            /*"www.baidu.com"*/
            /*"http://developer.51cto.com/art/201111/302195.htm"*/
            /*"http://cidian.youdao.com/download/YoudaoDict.exe"*/


            task.downloadId = 10;
            task.filePath = "D:\\test";
            task.taskStatus.taskStatus = TaskStatus.STATUS_STOPPED;
            IDownloadManage idm = new DownloadManager();
            idm.startDownload(task);
            

            /*Thread.Sleep(1000);
            idm.operateDownload(task, DownloadTaskOperation.DOWNLOAD_PAUSE);
            Thread.Sleep(1000);
            idm.operateDownload(task, DownloadTaskOperation.DOWNLOAD_CONTINUE);
            Thread.Sleep(1000);
            idm.operateDownload(task, DownloadTaskOperation.DOWNLOAD_PAUSE);
            Thread.Sleep(1000);
            idm.operateDownload(task, DownloadTaskOperation.DOWNLOAD_CONTINUE);
            Thread.Sleep(1000);
            idm.operateDownload(task, DownloadTaskOperation.DOWNLOAD_PAUSE);*/
            /*Thread.Sleep(1000);
            idm.operateDownload(task, DownloadTaskOperation.DOWNLOAD_PAUSE);
            Thread.Sleep(10000);
            idm.operateDownload(task, DownloadTaskOperation.DOWNLOAD_CONTINUE);*/
            /*Thread.Sleep(3000);
            idm.operateDownload(task, DownloadTaskOperation.DOWNLOAD_CANCEL);*/


            //while (true)
            //{
            //    Thread.Sleep(1000);
            //}

            
        }

        
    }
}
